package learn;

/**
 * 内部类是一个编译时的概念，一旦编译成功，就会成为完全不同的两类
 * @author darking
 *
 */
public class Outer {
	private static int i = 1;
	private int j = 10;
	private int k = 20;
	
	public static void outerFuncOne(){
		System.out.println("outerFuncOne");
	}
	
	public void outerFuncTwo(){
		System.out.println("outerFuncTwo");
	}
	
	class Inner {
		int j = 100;
		int inner_i = 1;
		
		void innerFuncOne(){
			System.out.println(j);
			System.out.println(this.j);
			System.out.println(Outer.this.j);
			System.out.println(k);
			System.out.println(inner_i);
			
			outerFuncOne();
			outerFuncTwo();
		}
	}
	
	public static void main(String[] args) {
		Outer outer = new Outer();
		Outer.Inner inner = outer.new Inner();
		inner.innerFuncOne();
	}
}
